package priv.yiyuan.example.design.wrapper;

/**
 * 具体装饰器
 *
 * @author YiYuan
 * @data 2025/9/1
 * @apoNote
 */
public class BorderDecorator extends GraphicDecorator {

    private String borderColor;

    public BorderDecorator(Graphic decoratedGraphic, String borderColor) {
        super(decoratedGraphic);
        this.borderColor = borderColor;
    }

    @Override
    public void draw() {
        decoratedGraphic.draw();
        System.out.println("增加 " + borderColor + " 边框");
    }

    @Override
    public Graphic clone() {
        return new BorderDecorator(decoratedGraphic.clone(), this.borderColor);
    }
}
